//
//  OSSocketController.m
//  MyChatDemo
//
//  Created by DragonYao on 2017/10/10.
//  Copyright © 2017年 DragonYao. All rights reserved.
//

#import "OSSocketController.h"
#import "IMSocketManager.h"

@interface OSSocketController ()<UITextFieldDelegate>

@property (weak, nonatomic) IBOutlet UITextField *textFeild;

@end

@implementation OSSocketController

- (IBAction)connectAction:(id)sender {
    [[IMSocketManager sharedManager] connectServer];
}

- (IBAction)closeAction:(id)sender {
    [[IMSocketManager sharedManager] disconnectServer];
}

- (IBAction)sendAction:(id)sender {
    if ([SLUtils isNilString:self.textFeild.text]) {
        return;
    }
    [[IMSocketManager sharedManager] sendMessage:self.textFeild.text];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    
}

- (void)textFieldDidEndEditing:(UITextField *)textField {
    
}

@end
